﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* TDesign 工业品色彩系统 */
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --primary-dark: #003cab;
            --secondary-color: #f2f3ff;
            --accent-color: #e37318;
            --success-color: #00a870;
            --warning-color: #ed7b2f;
            --error-color: #d54941;
            
            /* 背景色系 */
            --bg-color-page: #ffffff;
            --bg-color-container: #ffffff;
            --bg-color-secondray: #f8f9fc;
            
            /* 边框和分割线 */
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-small: 3px;
            --border-radius-medium: 6px;
            --border-radius-large: 9px;
            
            /* 文字色彩 */
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --text-disabled: #c9cdd4;
            
            /* 阴影系统 */
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-2: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
            --shadow-3: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
            
            /* 间距系统 */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;
            --space-8: 32px;
            --space-10: 40px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }
        
        /* 状态栏 */
        .status-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--space-2) var(--space-4);
            font-size: 12px;
            color: var(--text-primary);
            background: var(--bg-color-container);
        }
        
        .status-left {
            display: flex;
            align-items: center;
            gap: var(--space-1);
        }
        
        .status-right {
            display: flex;
            align-items: center;
            gap: var(--space-1);
        }
        
        /* 关闭按钮 */
        .close-btn {
            position: absolute;
            top: 60px;
            left: var(--space-4);
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--text-primary);
            cursor: pointer;
            z-index: 10;
        }
        
        /* 主要内容区域 */
        .main-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: var(--space-8) var(--space-4);
            text-align: center;
        }
        
        /* 应用Logo */
        .app-logo {
            width: 80px;
            height: 80px;
            background: var(--primary-color);
            border-radius: var(--border-radius-large);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: var(--space-4);
            box-shadow: var(--shadow-2);
        }
        
        .app-logo-text {
            color: white;
            font-size: 24px;
            font-weight: bold;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        /* 应用名称 */
        .app-name {
            font-size: 24px;
            font-weight: bold;
            color: var(--text-primary);
            margin-bottom: var(--space-2);
        }
        
        /* 应用描述 */
        .app-description {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: var(--space-10);
            line-height: 1.4;
        }
        
        /* 用户协议 */
        .agreement-section {
            margin-bottom: var(--space-8);
        }
        
        .agreement-checkbox {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-2);
            font-size: 12px;
            color: var(--text-secondary);
        }
        
        .checkbox {
            width: 16px;
            height: 16px;
            background: var(--primary-color);
            border-radius: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
        }
        
        .checkbox i {
            color: white;
            font-size: 10px;
        }
        
        .agreement-text {
            line-height: 1.4;
        }
        
        .agreement-link {
            color: var(--primary-color);
            text-decoration: none;
        }
        
        .agreement-link:hover {
            text-decoration: underline;
        }
        
        /* 登录按钮 */
        .login-button {
            width: 100%;
            max-width: 320px;
            height: 48px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-1);
        }
        
        .login-button:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: var(--shadow-2);
        }
        
        .login-button:active {
            transform: translateY(0);
            box-shadow: var(--shadow-1);
        }
        
        /* 响应式设计 */
        @media (max-width: 375px) {
            .app-logo {
                width: 70px;
                height: 70px;
            }
            
            .app-logo-text {
                font-size: 20px;
            }
            
            .app-name {
                font-size: 22px;
            }
            
            .main-content {
                padding: var(--space-6) var(--space-3);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 状态栏 -->
        <div class="status-bar">
            <div class="status-left">
                <span>21:03</span>
                <i class="fas fa-eye"></i>
                <span>N</span>
                <span>Q</span>
            </div>
            <div class="status-right">
                <i class="fas fa-wifi"></i>
                <i class="fas fa-signal"></i>
                <i class="fas fa-battery-three-quarters"></i>
                <span>91</span>
            </div>
        </div>
        
        <!-- 关闭按钮 -->
        <div class="close-btn" onclick="closeApp()">
            <i class="fas fa-times"></i>
        </div>
        
        <!-- 主要内容 -->
        <div class="main-content">
            <!-- 应用Logo -->
            <div class="app-logo">
                <div class="app-logo-text">模切</div>
            </div>
            
            <!-- 应用名称 -->
            <div class="app-name">模切材料小管家</div>
            
            <!-- 应用描述 -->
            <div class="app-description">专业的模切材料采购与服务平台</div>
            
            <!-- 用户协议 -->
            <div class="agreement-section">
                <div class="agreement-checkbox">
                    <div class="checkbox" onclick="toggleAgreement()">
                        <i class="fas fa-check"></i>
                    </div>
                    <div class="agreement-text">
                        我已阅读并同意<a href="#" class="agreement-link">《隐私政策》</a>和<a href="#" class="agreement-link">《服务协议》</a>
                    </div>
                </div>
            </div>
            
            <!-- 登录按钮 -->
            <button class="login-button" onclick="goToPhoneVerification()" id="loginBtn">
                手机号快速验证
            </button>
        </div>
    </div>
    
    <script>
        let agreementAccepted = true;
        
        // 切换用户协议状态
        function toggleAgreement() {
            agreementAccepted = !agreementAccepted;
            const checkbox = document.querySelector('.checkbox');
            const loginBtn = document.getElementById('loginBtn');
            
            if (agreementAccepted) {
                checkbox.style.background = 'var(--primary-color)';
                checkbox.innerHTML = '<i class="fas fa-check"></i>';
                loginBtn.disabled = false;
                loginBtn.style.opacity = '1';
            } else {
                checkbox.style.background = 'var(--text-disabled)';
                checkbox.innerHTML = '';
                loginBtn.disabled = true;
                loginBtn.style.opacity = '0.5';
            }
        }
        
        // 跳转到手机号验证页面
        function goToPhoneVerification() {
            if (!agreementAccepted) {
                alert('请先同意用户协议');
                return;
            }
            
            // 检查是否已保存手机号（免密登录）
            const savedPhone = localStorage.getItem('savedPhone');
            if (savedPhone) {
                const autoLogin = confirm(`检测到已保存的手机号：${savedPhone}\n\n是否直接登录？`);
                if (autoLogin) {
                    // 直接登录
                    loginSuccess();
                    return;
                }
            }
            
            // 跳转到手机号验证页面
            window.location.href = 'phone-verification.html';
        }
        
        // 登录成功
        function loginSuccess() {
            alert('登录成功！');
            // 跳转到主页
            window.location.href = 'home.html';
        }
        
        // 关闭应用
        function closeApp() {
            if (confirm('确定要退出应用吗？')) {
                // 在实际应用中，这里会关闭应用
                window.close();
            }
        }
        
        // 页面加载时检查登录状态
        document.addEventListener('DOMContentLoaded', function() {
            // 检查是否已经登录
            const isLoggedIn = localStorage.getItem('isLoggedIn');
            if (isLoggedIn === 'true') {
                // 已登录，直接跳转到主页
                window.location.href = 'home.html';
            }
        });
    </script>
</body>
</html>


